<?php
namespace App\Repositories\Teaching;
use App\Common\Utils\BaseRepository;
use App\Models\DecSubject;
use App\Models\Teaching\TeachingActivity;

/**
 * 教研活动
 */
class TeachingActivityRepository extends BaseRepository
{
    protected $model;

    public function __construct(TeachingActivity $teachingActivity)
    {
        $this->model = $teachingActivity;
    }

    /**
     * @Description: 数据处理
     * @Author: kzj
     * @datetime: 2023-02-28
     */
    public function dealRequestData($d)
    {
        $activity = [];
        $dicMultiple = []; //多选处理

        foreach($d as $k => $item) {
            switch($k) {
                case "live_id":
                case "teaching_type":
                case "activity_level":
                case "activity_type":
                case "is_sign":
                case "is_open":
                case "content":
                case "place":
                case "video_link":
                    $activity[$k] = $item;
                    break;

            }
        }

        return $activity;
    }
}
